//一.将下面异步代码使用 Promise 的方式改进
setTimeout(function () {
    var a = 'hello '
    setTimeout(function () {
        var b = 'lagou '
        setTimeout(function () {
            var c = 'I love you'
            console.log(a + b + c)
        }, 10);
    }, 10);
}, 10);

//用Promise方式改写
function f1(value) {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve(value)
        }, 10);
    })
}

Promise.all([f1('hello'), f1('lagou'), f1('I love you')]).then(result => {
    console.log(...result)
})